//
//  YJPersonData.m
//  YJB
//
//  Created by 高卫明 on 16/5/28.
//  Copyright © 2016年 YJB. All rights reserved.
//

#import "THPersonData.h"

@implementation THPersonData
- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init])
    {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

+ (instancetype)personWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

+ (NSMutableArray *)personsWithArray:(NSArray *)array
{
    NSMutableArray *persons = [NSMutableArray array];
    for (NSDictionary *dict in array)
    {
        THPersonData *person = [self personWithDict:dict];
        [persons addObject:person];
    }
    return persons;
}

@end
